﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using MP.Core.Library;
using MP.LayerHelper.MP_OBS.BLL;
public partial class Member_Tools_Control_LogsByDateList : MP.Core.Authentication.Control.AuthenBase
{
    DateTime fromDate { get { return FDateTime.ConvertDate(Request["fr"]); } }
    DateTime toDate { get { return FDateTime.ConvertDate(Request["to"]); } }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            loadData();
        }
    }

    void loadData()
    {
        DataTable tbl = MbModulesManager.CreateInstant().SelectByParentCodeRDT(null);
        tbl.DefaultView.Sort = "ModName";
        tbl.DefaultView.RowFilter = "IsEnable=1";
        rep.DataSource = tbl.DefaultView;
        rep.DataBind();
    }

    public DataTable GetLogs(string moduleId)
    {
        return MbLogPageManager.CreateInstant().GetLogsTotalByModule(moduleId, fromDate, toDate);
    }
}
